import request from '../utils/request'

// 查询用户
export const getRoles = () => request({
  url: '/api/v1/admin/roles',
  method: 'GET'
})

// interface MyResponseData {
//   list: any[];
//   // 其他属性...
// }
// 查询权限
export const getPermissions = () => request({
  url: '/api/v1/admin/permissions',
  method: 'GET'
})
// 查询单个权限
export const getPermissionsId = (id:string) => request({
  url: `/api/v1/admin/roles/${id}/permissions`,
  method: 'GET',
})
/**
 * 获取登录用户基本信息
 */
export const getUserInfo = () => request({
  url: '/menu',
})
